Is it possible to create a generic type to use in another types